package com.wanghlme.bookstore.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;

/**
 * @author WangHailong
 * @TableName hello
 */
@TableName(value = "hello")
public class Hello implements Serializable {

    @TableId(type = IdType.ASSIGN_UUID)
    private String helloId;
    private String helloName;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public Hello() {
    }

    public Hello(String helloId, String helloName) {
        this.helloId = helloId;
        this.helloName = helloName;
    }

    public String getHelloId() {
        return helloId;
    }

    public void setHelloId(String helloId) {
        this.helloId = helloId;
    }

    public String getHelloName() {
        return helloName;
    }

    public void setHelloName(String helloName) {
        this.helloName = helloName;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Hello other = (Hello) that;
        return (this.getHelloId() == null ? other.getHelloId() == null : this.getHelloId().equals(other.getHelloId()))
                && (this.getHelloName() == null ? other.getHelloName() == null : this.getHelloName().equals(other.getHelloName()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getHelloId() == null) ? 0 : getHelloId().hashCode());
        result = prime * result + ((getHelloName() == null) ? 0 : getHelloName().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", helloId=").append(helloId);
        sb.append(", helloName=").append(helloName);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}